home *** CD-ROM | disk | FTP | other *** search
- on waitTime theTime
- global tempTimer
- if tempTimer > 0 then
- if tempTimer < the ticks then
- go(the frame + 1)
- set tempTimer to 0
- else
- go(the frame)
- end if
- else
- set tempTimer to the ticks + (theTime * 60)
- go(the frame)
- end if
- end
-
- on waitSound theChannel
- if soundBusy(theChannel) then
- go(the frame)
- end if
- end
-
- on stopAndWait theChannel
- set xx to 1
- repeat while xx
- if not soundBusy(theChannel) then
- exit repeat
- end if
- end repeat
- end
-
- on stopAndWaitTime theTime
- set xx to the ticks + (theTime * 60)
- repeat while the ticks < xx
- nothing()
- end repeat
- end
-
- on waitForQT theChannel
- set xx to the stopTime of sprite theChannel
- if the movieTime of sprite theChannel < xx then
- go(the frame)
- end if
- end
-
- on LoopOnSound theChannel, theMarker
- set mm to theMarker
- set cc to theChannel
- if value(mm) = EMPTY then
- if soundBusy(cc) then
- go(mm)
- end if
- else
- if soundBusy(cc) then
- go(marker(mm))
- end if
- end if
- end
-
- on LoopOnTime theSeconds, theMarker
- global tempTimer
- set mm to theMarker
- set ss to theSeconds
- if tempTimer > 0 then
- if tempTimer < the ticks then
- go(the frame + 1)
- set tempTimer to 0
- else
- go(marker(mm))
- end if
- else
- set tempTimer to the ticks + (theSeconds * 60)
- go(marker(mm))
- end if
- end
-
- on LoopOnQT theChannel, theMarker
- set mm to theMarker
- set cc to theChannel
- set xx to the stopTime of sprite cc
- if value(mm) = EMPTY then
- if the movieTime of sprite cc < xx then
- go(mm)
- end if
- else
- if the movieTime of sprite cc < xx then
- go(marker(mm))
- end if
- end if
- end
-
- on cursorClick theChannel, theTotal
- global movieCastList
- set tempCursor to the name of cast the castNum of sprite theChannel
- puppetSprite(theChannel, 1)
- if theTotal < 0 then
- if movieCastList = EMPTY then
- alert("gotta use loadCastList first")
- exit
- end if
- repeat with xx = 1 to count(movieCastList)
- set tempchecker to string(tempCursor & xx)
- if doesCastExist(tempchecker) = 0 then
- exit repeat
- end if
- end repeat
- if xx < 1 then
- exit
- end if
- else
- set xx to theTotal
- end if
- repeat with nn = 1 to xx
- set the castNum of sprite theChannel to the number of cast (tempCursor & nn)
- updateStage()
- end repeat
- set the castNum of sprite theChannel to the number of cast tempCursor
- puppetSprite(theChannel, 0)
- updateStage()
- end
-
- on loadCastList
- global movieCastList
- set movieCastList to []
- repeat with xx = 1 to the number of castMembers
- if the name of cast xx <> "0" then
- append(movieCastList, the name of cast xx)
- end if
- end repeat
- end
-
- on doesCastExist theName
- global movieCastList
- if movieCastList = EMPTY then
- loadCastList()
- end if
- return getPos(movieCastList, theName)
- end
-
- on clearPuppets theBeg, theEnd
- repeat with nn = theBeg to theEnd
- puppetSprite(nn, 0)
- end repeat
- end
-